const app = getApp()
Page({
  data:{
    price:200,
    tixian:''
  },
  onShow:function(){
    var openid = app.globalData.openid;
    var that = this;
    if(openid==null){
      wx.switchTab({
        url: '/pages/my/my',
        success:function(){
          wx.showToast({
            title: '请登入后操作',
            icon: 'none',
            duration: 2000
          })
        }
      })
    }
    wx.request({
      url: app.globalData.apiUrl+'/api/user/commission',
      data: {openid:openid},
      method: 'GET',
      dataType: 'json',
      success: function(res) {
        console.log(res)
        that.setData({tixian:res.data})
      },
      fail: function(res) {},
      complete: function(res) {},
    })
  }
})